home *** CD-ROM | disk | FTP | other *** search
/ Programming Windows 95 with MFC / Programming Windows 95 with MFC (Microsoft Programming Series)(097-0001465)(1996).iso / CODE / Chap14 / Threads / Threads.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-05  |  999 b   |  45 lines

  1. //***********************************************************************
  2. //
  3. //  Threads.h
  4. //
  5. //***********************************************************************
  6.  
  7. class CMyApp : public CWinApp
  8. {
  9. public:
  10.     virtual BOOL InitInstance ();
  11. };
  12.  
  13. class CMainWindow : public CFrameWnd
  14. {
  15. private:
  16.     CWinThread* m_pThread[4];
  17.     BOOL m_bContinue[4];
  18.     BOOL m_bFriendlyThreads;
  19.  
  20.     void DrawHand (CDC*, int, int, int, COLORREF);
  21.     static UINT ThreadFunc (LPVOID);
  22.  
  23. public:
  24.     CMainWindow ();
  25.  
  26. protected:
  27.     virtual BOOL PreCreateWindow (CREATESTRUCT&);
  28.  
  29.     afx_msg void OnClose ();
  30.     afx_msg void OnToggleThread (UINT);
  31.     afx_msg void OnFriendlyThreads ();
  32.     afx_msg void OnUpdateThreadUI (CCmdUI*);
  33.     afx_msg void OnUpdateFriendlyThreadsUI (CCmdUI*);
  34.     afx_msg void OnExit ();
  35.  
  36.     DECLARE_MESSAGE_MAP ()
  37. };
  38.  
  39. typedef struct tagTHREADPARMS {
  40.     CPoint point;
  41.     BOOL* pContFlag;
  42.     BOOL* pFriendFlag;
  43.     LPARAM lParam;
  44. } THREADPARMS;
  45.